﻿using _17bangMVC.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace _17bangMVC.Controllers
{
    public class PlanController : Controller
    {
        //private PlanRepository planRepository;
        //public PlanController()
        //{
        //    SqlDbContext context = new SqlDbContext();
        //    planRepository = new PlanRepository(context);
        //}
        // GET: Plan
        [HttpGet]
        public ActionResult New()
        {
            PlanModel model = new PlanModel
            {
                StartTime = DateTime.Now,
                EndTime = DateTime.Now,

            };
            return View(model);
        }
        [HttpPost]
        public ActionResult New(PlanModel model)
        {
            if (!ModelState.IsValid)
            {
                return View(model);
            }
            return View();
        }
    }
}